package com.cloudbroker.bcs.csvc.uc.facade.service;

import com.cloudbroker.bcs.csvc.uc.api.constants.LTBT2FunctionIds;
import com.cloudbroker.bcs.csvc.uc.api.service.LTBService;
import com.cloudbroker.bcs.csvc.uc.api.vo.request.*;
import com.cloudbroker.bcs.csvc.uc.api.vo.response.*;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by lnq on 2016/11/30.
 */
@Service
public class LTBServiceFacade implements LTBService{
    @Resource
    private T2RemoteService service;
    @Override
    public LTBTokenBackVo funcGetLTBUserToken(FuncLTBTokenForm param) {
        return service.callT2(LTBT2FunctionIds.GET_USER_TOKEN, param, LTBTokenBackVo.class);
    }

    @Override
    public LTBRealtimeCombineQryResult funcGetLTBRealtimeCombineQry(FuncLTBRealtimeCombineForm param) {
        return service.callT2(LTBT2FunctionIds.REALTIME_COMBINE_QRY_ID, param, LTBRealtimeCombineQryResult.class);
    }

    @Override
    public LTBCombineBasicInfoQryVo getCombineBasicInfoQry(LTBCombineBasicInfoQryForm param) {
        return service.callT2(LTBT2FunctionIds.COMBINE_BASIC_INFO_QRY, param, LTBCombineBasicInfoQryVo.class);
    }

    @Override
    public LTBRealtimeQryByJSON getRealtimeQry(LTBRealtimeQryForm param) {
        return service.callT2(LTBT2FunctionIds.REALTIME_QRY, param, LTBRealtimeQryByJSON.class);
    }

    @Override
    public LTBPointQueryBackVo funcGetPointQry(LTBPointQryForm param) {
        return service.callT2(LTBT2FunctionIds.GET_POINT_QUERY, param, LTBPointQueryBackVo.class);
    }

    @Override
    public LTBPointChangeBackVo funcAddPoint(LTBPointAddForm param) {
        return service.callT2(LTBT2FunctionIds.ADD_POINT, param, LTBPointChangeBackVo.class);
    }

    @Override
    public LTBPointChangeBackVo funcCostPoint(LTBPointAddForm param) {
        return service.callT2(LTBT2FunctionIds.COST_POINT, param, LTBPointChangeBackVo.class);
    }

    @Override
    public LTBComuserSignQryBackVo comuserSignQry(LTBComuserSignQryForm param) {
        return service.callT2(LTBT2FunctionIds.COMUSER_SIGN_QRY, param, LTBComuserSignQryBackVo.class);
    }

    @Override
    public LTBTokenBackVo redirectLTBUserToken(LTBRedirectLoginTokenForm param) {
        return service.callT2(LTBT2FunctionIds.REDIRECT_TOKEN, param, LTBTokenBackVo.class);
    }
}
